1. Field of the Invention
The present invention relates to machine vision and automated inspection systems, and more particularly to a method and apparatus for inspection of a solder paste screen printed on printed circuit boards using a stencil.
2. Description of Background Information
One method of assembling printed circuit boards (PCBs) requires solder paste to be applied to the printed circuit board before components, such as integrated circuits and discrete devices, are placed and ultimately secured onto the board. Initially, the sticky solder paste temporarily holds the components in place on the PCB until the solder paste is melted or re-flowed. When the solder paste is re-flowed, it forms both mechanical and electrical connections between the components and the board. If there is not enough solder paste present, components may be inadequately connected to the PCB. If there is too much solder paste, or if solder paste is deposited in the wrong place, an extra electrical connection or short is formed. This is generally referred to as a solder bridge.
Automated processes for fabricating PCBs are generally known, including process steps for applying solder paste to circuit boards using screen-printing techniques. Prior to printing, a thin metal stencil or template is constructed with openings or apertures matching appropriate places on the PCB where paste should be printed; typically bond pads. During printing, the stencil is aligned to the PCB. The solder paste is then applied to the PCB through the stencil openings by using a squeegee to spread the paste. Then the stencil is lifted off the PCB and the PCB is transported to the next step in the assembly process.
Automatic inspection or vision systems may be used to detect problems in the printing process, including problems associated with the stencil and problems associated with the application of paste to the PCB. Stencil problems are usually in the form of blocked stencils or paste adhering to the bottom of the stencil (smear). It is usually desirable to detect stencil blockage and smear before any clean circuit boards are misprinted. Misalignment of the stencil and PCB may be detectable prior to the distribution of solder paste by inspection of the stencil position relative to the PCB before printing thereon. The PCB can be inspected to detect incorrect solder paste distribution after printing. Automatic inspection may be used to determine if there is too little solder paste, too much solder paste or solder paste in the wrong places on the printed circuit board.
The automated inspection of solder paste on PCBs is inherently difficult to accomplish. The solder paste is difficult to identify on the PCB because it is variable in terms of its appearance as imaged by the imaging system. The paste appearance varies over time, e.g., wet paste has a different appearance than dry paste. The paste has texture and the gray level reflectance of the paste is similar to bonding pads with tinning and other circuitry on the PCB. Also, the three-dimensional shape of the paste causes shadowing and other variable imaging as the paste moves under the lighting. The inherent difficulty is exacerbated by variability from one PCB to the next. For example, the color of circuit boards of a single type in one printing can vary from light green to dark green or blue. In one printing run, the relative positioning of portions or all of a PCB of a single board type may vary with respect to the stencil or solder mask on the board. Additionally, all of the circuitry on a board is subject to dimensional variability. Perhaps, most significantly, the solder paste deposited on a board can obscure bond pads beneath it making it impossible to tell either what is beneath the solder paste or what is the relative alignment of the solder paste to the pads.
Known in-line or automated inspection systems for solder paste inspection do not adequately overcome such difficulties. Some known systems typically perform inspection by selecting gray level thresholds to segment paste from other regions by gray level. This is typically known as binarization (for two gray levels) or trinarization (for three gray levels). All pixels with gray levels between two thresholds are labeled as paste because the pads are usually the brightest objects in the image and boards are the darkest. The paste gray levels are typically somewhere in the middle.
To accomplish the above inspection, one distinguishes between the pads and other regions of the circuit board. Similarly, on the stencil, one needs to locate the aperture regions. To do this, one common mode of operation is to generate a model or parametric description of an inspection site. The purpose of this model is to be able to find pads and apertures at inspection time. This model is typically created by analyzing a representative image of a clean circuit board and stencil.
This invention is a method for creating a parametric model of board and stencil inspection sites. This technique generates the models by analysis of an image of a representative circuit board and/or stencil with little aid from a human operator.
This invention overcomes several problems with current methods of paste inspection. One known method for generating inspection site models is using binarization. This assumes that pads are brighter than everything else on the circuit board and picks a gray level threshold that segments the pad regions by gray level. Similarly on the stencil side, aperture regions are assumed to be the darkest regions in the image. This method is inaccurate and prone to error. Circuit boards have many confusing regions and stencils have a shiny metallic surface that does not image well with confusing surface texture. Also, picking a good threshold is very difficult when an image has many gray levels such as a circuit board.
Terminology
Inspection sitexe2x80x94This is a region of the circuit board and/or the stencil that is chosen for inspection. Typically, an inspection site contains a number of bonding pads and/or stencil apertures. The magnification and resolution of the optical system determine the size of the site as imaged by the acquisition system.
Printingxe2x80x94Refers to the printing of solder paste on a circuit board. Pre-print refers to the point in the time in the printing cycle before printing where the circuit board is clean and free of solder paste. Post-print refers to the point in time after printing.
Trainingxe2x80x94This refers to the process of producing a model or description of an inspection site. This is typically done by the operator defining a region of interest in the image and then analyzing that image, where the region of interest can be apertures on the stencil or pads on the circuit board, for example. Preferably, the model is a parametric geometric model that contains terms from which a geometric representation can be constructed. For instance, a parametric model of part of a circuit board having three rectangular pads is {wpcb, hpcb,  less than loc1, wl, h1 greater than ,  less than loc2, w2, h2 greater than ,  less than loc3, w3, h3 greater than }, where wpcb and hpcb are the width and height of the inspection site, respectively, locn is the location of the nth pad, and wn and hn is the width and height of the nth pad. A parametric model is advantageous over an image model because it requires less stored data, and because regions of interest, such as pads, have already been located and, therefore, de-emphasizes extraneous features in the image which could otherwise confuse the inspection method.
Inspection sites, printing, and training are further described in U.S. Pat. No. 5,912,984, titled xe2x80x9cMethod and Apparatus for In-Line Solder Paste Inspectionxe2x80x9d, issued on Jun. 15, 1999, in the names of D. Michael, J. Koljonen, S. Nichani, and P. Roberts.